class okMath
{
  RPX2PX(rpx)
  {
    const device = wx.getSystemInfoSync()
    const width = device.windowWidth * device.pixelRatio
    //const height = device.windowHeight - 100;
    return width/750 * rpx;
  }

  PX2RPX(px)
  {
    const device = wx.getSystemInfoSync()
    const width = device.windowWidth * device.pixelRatio
    return px / (width/750)
  }

  //高度方向占据的rpx
  HeightRPX()
  {
    const device = wx.getSystemInfoSync()
    return this.PX2RPX(device.windowHeight * device.pixelRatio)
  }
}

var inst = new okMath()
export { inst as okMath}